<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Creates an instance of a Relational Data Access Service</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sdo-das-relational.applychanges.html">SDO_DAS_Relational::applyChanges</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sdo-das-relational.createrootdataobject.html">SDO_DAS_Relational::createRootDataObject</a></div>
 <div class="up"><a href="ref.sdodasrel.html">SDO-DAS-Relational 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="sdo-das-relational.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SDO_DAS_Relational::__construct</h1>
  <p class="verinfo">(^)</p><p class="refpurpose"><span class="refname">SDO_DAS_Relational::__construct</span> &mdash; <span class="dc-title">
   Creates an instance of a Relational Data Access Service
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sdo-das-relational.construct-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>SDO_DAS_Relational::__construct</strong></span>
    ( <span class="methodparam">
    <span class="type">array</span>
     <code class="parameter">$database_metadata</code>
   </span>
   [, <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$application_root_type</code>
   </span>
   [, <span class="methodparam">
    <span class="type">array</span>
     <code class="parameter">$SDO_containment_references_metadata</code>
   </span>
  ]] )</div>


  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的
PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>

  <p class="para">
   Constructs an instance of a Relational Data Access Service 
   from the passed metadata.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-sdo-das-relational.construct-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
database_metadata</dt>

     <dd>

      <p class="para">
       An array containing one or more table definitions, 
       each of which is an associative array containing the keys
       <var class="varname"><var class="varname">name</var></var>,
       <var class="varname"><var class="varname">columns</var></var>,
       <var class="varname"><var class="varname">PK</var></var>, and optionally,
       <var class="varname"><var class="varname">FK</var></var>.
       For a full discussion of the metadata, see the
       <a href="sdodasrel.metadata.html" class="link">metadata</a>
       section in the general information about the Relational DAS.
      </p>
     </dd>

    
    
     <dt>
application_root_type</dt>

     <dd>

      <p class="para">
       The root of each data graph is an object of a special root type and 
       the application data objects come below that.
       Of the various application types in the SDO model, 
       one has to be the application type immediately 
       below the root of the data graph.
       If there is only one table in the database metadata, 
       so the application root type can be inferred, this argument can be omitted.
      </p>
     </dd>

    
    
     <dt>
SDO_containment_references_metadata</dt>

     <dd>

      <p class="para">
       An array containing one or more definitions of a containment relation, 
       each of which is an associative array containing the keys
       <var class="varname"><var class="varname">parent</var></var>
       and
       <var class="varname"><var class="varname">child</var></var>.
       The containment relations describe how the types in the model 
       are connected to form a tree.
       The type specified as the application root type must be present 
       as one of the parent types in the containment references.
       If the application only needs to work with one table at a time, 
       and there are no containment relations in the model, 
       this argument can be omitted.
       For a full discussion of the metadata, see the
       <a href="sdodasrel.metadata.html" class="link">metadata</a>
       section in the general information about the Relational DAS.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-sdo-das-relational.construct-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an SDO_DAS_Relational object on success.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-sdo-das-relational.construct-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   <span class="function"><strong>SDO_DAS_Relational::__construct()</strong></span>
   throws a <strong class="classname">SDO_DAS_Relational_Exception</strong> if 
   any problems are found in the metadata.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-sdo-das-relational.construct-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   For a full discussion of the metadata, see the
   <a href="sdodasrel.metadata.html" class="link">metadata</a>
   section in the general information about the Relational DAS.
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sdo-das-relational.applychanges.html">SDO_DAS_Relational::applyChanges</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sdo-das-relational.createrootdataobject.html">SDO_DAS_Relational::createRootDataObject</a></div>
 <div class="up"><a href="ref.sdodasrel.html">SDO-DAS-Relational 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
